package com.ss.android.http.legacy.a;

import com.ss.android.http.legacy.HttpHeader;

import java.util.ArrayList;
import java.util.List;

public final class ResponseHeaders implements Cloneable {
    public List<HttpHeader> httpHeaderList;

    public ResponseHeaders() {
        this.httpHeaderList = new ArrayList(16);
    }

    public final HttpHeader getHeader(String name) {
        for (int i = 0; i < httpHeaderList.size(); i++) {
            HttpHeader httpHeader = this.httpHeaderList.get(i);
            if (httpHeader.name().equalsIgnoreCase(name)) {
                return httpHeader;
            }
        }
        return null;
    }

    public final Object clone() throws CloneNotSupportedException {
        ResponseHeaders responseHeaders = (ResponseHeaders) super.clone();
        responseHeaders.httpHeaderList = new ArrayList(this.httpHeaderList);
        return responseHeaders;
    }
}

